//公共的请求方法
import base from "./base";
import axios from "@/utils/request";
import { login, permission } from "./login/login";
import product from "./product";
const api = {
  /* 
      首页数据统计
    */
  totalInfo() {
    return axios.get(base.totalInfo);
  },
  /* 
    首页数据
  */
  orderinfo() {
    return axios.get(base.orderinfo);
  },
  /* 
      图表数据
    */
  format() {
    return axios.get(base.format);
  },
  //学生信息接口---
  ...product,

  /* 
    体检类别列表
  */
  orderList(params) {
    return axios.get(base.orderList, { params });
  },
  /* 
    搜索接口
    params={search:xx}
  */
  searchS(params) {
    return axios.get(base.searchS, { params });
  },
  /* 
    搜索接口
    params={search:xx}
  */
  searchStaff(params) {
    return axios.get(base.searchStaff, { params });
  },
  /*
    添加
  */
  addStaff(params) {
    return axios.get(base.addStaff, { params });
  },
  /*
  编辑*/
  updateStaff(params) {
    return axios.get(base.updateStaff, { params });
  },
  /*
    添加校医
  */
  addDoctor(params) {
    return axios.get(base.addDoctor, { params });
  },
  /*
    编辑*/
  updateDoctor(params) {
    return axios.get(base.updateDoctor, { params });
  },
  /* 
  批量删除
    {ids:字符串--id}
  */
  batchDeleteS(params) {
    return axios.get(base.batchDeleteS, { params });
  },
  batchDeleteStaff(params) {
    return axios.get(base.batchDeleteStaff, { params });
  },
  /* 
    汇总---ids=''
    */
  changeStatus(params) {
    return axios.get(base.changeStatus, { params });
  },
  /* 
    校医
    {page}
     */
  collect(params) {
    return axios.get(base.collect, { params });
  },
  /* 
      详情
      {id}
    */
  getDetail(params) {
    return axios.get(base.detail, { params });
  },
  //登录
  login,
};
// //单个导出
// export function permission(params){
//   return axios.get(base.permission,{
//     params
//   })
// }
export { permission };

//vue组件实例：this.$api.permission()
//导出对象 api身上挂载了很多方法
export default api;
